<template>
  <div>
    <h1 v-text="msg" ref="title"></h1>
    <button @click="showDOM" ref="btn">点我输出上方的DOM元素</button>
    <School ref='sch'></School>
    <School></School>
    <School></School>
  </div>
</template>

<script>
import School from "./components/School";
export default {
  name: "App",
  data() {
    return {
      msg:"Hello, World!"
    }
  },
  computed: {},
  components: {
    School,
  },
  methods: {
    showDOM(e){
      // alert(document.getElementById("title").innerText);
      // alert(this.$refs.title.innerText);
      console.log(this.$refs.title);
      console.log(this.$refs.btn);
      console.log(this.$refs.sch);
    }
  },
  watch: {},
  filters: {},
  directives: {}
}
</script>

<style scoped>

</style>